<?php if (!defined('THINK_PATH')) exit();?>﻿<!DOCTYPE HTML>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=0, minimum-scale=1.0, maximum-scale=1.0">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <meta content="email=no" name="format-detection"/>
    <meta content="telephone=no" name="format-detection" />
<link href="/Public/css/layout.css" type="text/css" rel="stylesheet" >
<link rel="stylesheet" href="/Public/css/swiper.min.css">
<script src="/Public/js/jquery-1.10.1.min.js"></script>
<script src="/Public/js/swiper.min.js"></script>
<script src="/Public/js/TouchSlide.1.1.js" type="text/javascript"></script>
</head>
<body>
<!--search start-->
<div class="search">
  <div class="search-cont">
      <?php if(empty($avatar)){ ?>
      <a href="/login"><i class="icon-iconfont-yuanzhongtou"></i></a>
      <?php }else{ ?>
      <a href="/login_out"><img src="<?php echo ($avatar); ?>" class="icon-iconfont-yuanzhongtou-2" style="width: 28px; height: 30px;" ></a>
      <?php } ?>
      <div class="search-inp"><i class="icon-iconfont-sousuo"></i>
      <div class="search-input-box">
        <input class="search-input" type="text" placeholder="输入关键字">
      </div>
    </div>
  </div>
</div>
<!-- search end-->
<div class="page">
  <div class="h45"></div>
  <!--banner start-->
  <div class="banner">
    <div id="slideBox" class="slideBox">
      <div class="bd">
        <ul>
          <?php foreach($banner as $k => $v){ ?>
          <li> <a class="pic" href="#"><img src="<?php echo ($v['image']); ?>" /></a> </li>
          <?php } ?>
        </ul>
      </div>
      <div class="hd">
        <ul>
        </ul>
      </div>
    </div>
    <script type="text/javascript">
				TouchSlide({
					slideCell:"#slideBox",
					titCell:".hd ul",
					mainCell:".bd ul",
					effect:"leftLoop",
					autoPage:true,
					autoPlay:true
				});
			</script>
  </div>
  <!-- banner end--> 
  <!--menu start-->
<div class="menu">
<div class="menu-sub"><a href="/category/departments" class="menu-sub1"></a><span>科室找药</span></div>
<div class="menu-sub"><a href="/category/body" class="menu-sub2"></a><span>部位找药</span></div>
<div class="menu-sub"><a href="/category/family" class="menu-sub3"></a><span>家庭小药箱</span></div>
<div class="menu-sub"><a href="/category/season" class="menu-sub4"></a><span>季节病</span></div>
<div class="menu-sub"><a href="/category/chronic" class="menu-sub5"></a><span>慢性病</span></div>
<div class="menu-sub"><a href="/category/old" class="menu-sub6"></a><span>老人用药</span></div>
<div class="menu-sub"><a href="/category/child" class="menu-sub7"></a><span>儿童用药</span></div>
<div class="menu-sub"><a href="/category/female" class="menu-sub8"></a><span>妇女用药</span></div>
</div>
<!--menu end-->
<!--coverflow start-->
<div class="coverflow-tit"> <i class="icon-iconfont-icon28"></i> 热评TOP 10 </div>
<div class="coverflow">
    <div class="swiper-container">
    <div class="swiper-wrapper">
    <?php foreach($nTop as $ke => $va){ ?><div class="swiper-slide">
      <div class="coverflow-cont">
          <a href="/drug/<?php echo ($va['objectId']); ?>">
              <img src="http://7xlaxq.com1.z0.glb.clouddn.com/<?php echo ($va['image_key']); ?>-banner" class="coverflow-img">
                <p class="coverflow-info">
                    <span class="coverflow-info-left">
                        <span class="coverflow-info-tit"><?php echo ($va['product_name']); ?></span>
                        <span class="coverflow-info-deso"><?php echo ($va['factory']); ?></span>
                    </span>
                    <span class="coverflow-info-right">
                        <span class="coverflow-info-pl">评论人数</span>
                        <i class="coverflow-info-plno"><?php echo ($va['comment_count']/1000%10); ?></i>
                        <i class="coverflow-info-plno"><?php echo ($va['comment_count']/100%10); ?></i>
                        <i class="coverflow-info-plno"><?php echo ($va['comment_count']/10%10); ?></i>
                        <i class="coverflow-info-plno"><?php echo ($va['comment_count']/1%10); ?></i>
                  </span>
                </p>
          </a>
      </div>
        </div>
    <?php } ?>
      </div>
    </div>
</div>
<!--coverflow end-->
<div class="know-tit"> <i class="icon-iconfont-zhishiku"></i> 健康知识</div>
<div class="know">
    <ul class="know-ul">
        <?php foreach($list_news as $key => $value){ ?>
        <li class="know-li"><a href="/news/<?php echo ($value['id']); ?>"><img src="<?php echo ($tngou_image_prefix); echo ($value['img']); ?>_120x80" class="know-img">
    <span class="know-right"><span class="know-right-tit"><?php echo ($value['title']); ?></span><span class="know-right-info">
      <span class="know-right-pls">已读 <?php echo ($value['count']); ?></span>
      <span class="<?php echo ($category_list[$value['loreclass']]['class']); ?>"><?php echo ($category_list[$value['loreclass']]['title']); ?></span></span></span></a></li>
        <?php } ?>
    </ul>
    <div class="load-more"><a href="/nList/1"><span>查看更多</span></a></div>
</div>
</div>
<!-- Swiper JS --> 

<!-- Initialize Swiper --> 
<script>


    function browserRedirect() {
        var sUserAgent = navigator.userAgent.toLowerCase();
        var bIsIpad = sUserAgent.match(/ipad/i) == "ipad";
        var bIsIphoneOs = sUserAgent.match(/iphone os/i) == "iphone os";
        var bIsMidp = sUserAgent.match(/midp/i) == "midp";
        var bIsUc7 = sUserAgent.match(/rv:1.2.3.4/i) == "rv:1.2.3.4";
        var bIsUc = sUserAgent.match(/ucweb/i) == "ucweb";
        var bIsAndroid = sUserAgent.match(/android/i) == "android";
        var bIsCE = sUserAgent.match(/windows ce/i) == "windows ce";
        var bIsWM = sUserAgent.match(/windows mobile/i) == "windows mobile";
        if (bIsAndroid) {
            var swiper = new Swiper('.coverflow .swiper-container', {
                grabCursor: true,
                centeredSlides: true,
                slidesPerView: 'auto',
                loop: true
            });
        }else{
            var swiper = new Swiper('.coverflow .swiper-container', {
                effect: 'coverflow',
                grabCursor: true,
                centeredSlides: true,
                slidesPerView: 'auto',
                coverflow: {
                    rotate: 40,
                    stretch: 0,
                    depth: 100,
                    modifier: 1,
                    slideShadows : false
                },
                loop: true
            });
        }
    }

  $(function(){
    $(".search-input").on('focus',function(e){
      window.location.href = '/search';
    });
      browserRedirect();
  });

    
</script>
</body>
</html>